{#include file="top.php"#}
<script type="text/javascript">
    function select(){
        var s = $("#select_c");
        if(parseInt(s.attr('v'))==0){
            s.show();
            s.attr('v',1);
        }else{
            s.hide();
            s.attr('v',0);
        }
    }
</script>
<div class="body">

    <div class="main fl">
        <div class="crumb">
            <a href="{#optimize_url('events', 'invite_list')#}">活動事件</a> &gt;
            <strong>{#if $s eq 3#}活動報導{#else if $s eq 2#}過往活動{#else if $s eq 1#}活動邀請{#else#}全部活動{#/if#}</strong>
        </div>
        <div class="{#if $s neq 2#}eibox{#else#}pebox{#/if#} b_box">
            <div class="hd">
                <h2 class="ir ht {#if $s eq 3#}ht_er{#else if $s eq 0#}ht_ev{#/if#}"><span>{#if $s eq 3#}活動報導{#else if $s eq 2#}過往活動{#else if $s eq 1#}活動邀請{#else#}全部活動{#/if#}</span></h2>
                <div class="slt" onclick="select()">
                    <strong class="tri down"></strong>
                </div>
                <div class="sltbox">
                    <div class="dt" onclick="select()" style='cursor:pointer;' >
                        {#$select.$s#}
                    </div>
                    <div id="select_c" v=0 class="dd" style="display:none">
                        {#foreach  from=$select item=v key=k#}
                        <p><a href="{#optimize_url('events', 'invite_list','type='|cat:$type|cat:'&s='|cat:$k)#}">{#$v#}</a></p>
                        {#/foreach#}
                    </div>
                </div>
            </div>
            <div class="bd">
                <div class="tag">
                    <a {#if $type eq 0#}class="curr"{#/if#} href="{#optimize_url('events', 'invite_list','type=0&s='|cat:$k)#}">所有分類</a>
                    {#foreach  from=$event_type_list.result item=v key=k#}
                    | <a {#if $type eq ($k+1)#}class="curr"{#/if#} href="{#optimize_url('events', 'invite_list','type='|cat:($k+1)|cat:'&s='|cat:$s)#}" class="">{#$v.cname#}</a>
                    {#/foreach#}
                </div>
                {#foreach  from=$event_list_res item=v key=k#}
                <div class="areabox {#if $v.member_type==5#}pro{#else#}try{#/if#}">
                    <h2 class="at">{#if $v.member_type==5#}尊業體驗團{#else#}試用專員{#/if#}</h2>
                    <div class="lbox">
						<div class="imgbox"><p class="img_p"><a href="{#$v._button_url#}"><span><img src="{#$v._photo_url#}"></span></a></p></div>
                        <div class="ir {#if $v.event_type==1#}gf{#else#}act{#/if#}"><span><a href="{#$v._button_url#}">{#$v.cname#}</a></span></div>
                        <!--<div class="ir act"><span>活動</span></div>-->

                    </div>
                    <div class="rbox">
                        <div class="tbox">
                            <table width="100%" border="0" cellpadding="0">
                                <tr>
                                    <td colspan="2" class="tt">{#$v.brand_str#}</td>
                                </tr>
                                <tr>
                                    <td colspan="2">{#$v.title#}</td>
                                </tr>
                                <tr>
                                <table width="100%" border="0" cellpadding="0">
                                    {#if !empty($v.event_date)#}
                                    <tr class="sep">
                                        <td class="label"><span>：</span>日期</td>
                                        <td>{#date('Y年m月d日',strtotime($v.event_date))#}</td>
                                    </tr>
                                    {#/if#}
                                    {#if !empty($v.event_time)#}
                                    <tr class="sep">
                                        <td class="label"><span>：</span>時間</td>
                                        <td>{#$v.event_time#}</td>
                                    </tr>
                                    {#/if#}
                                    {#if !empty($v.place)#}
                                    <tr class="sep">
                                        <td class="label"><span>：</span>地點</td>
                                        <td>{#$v.place#}</td>
                                    </tr>
                                    {#/if#}
                                    {#if !empty($v.intro)#}
                                    <tr class="sep">
                                        <td class="label"><span>：</span>簡介</td>
                                        <td>{#nl2br($v.intro)#}</td>
                                    </tr>
                                    {#/if#}
                                    <tr class="sep">
                                        <td class="td_red"><span>：</span>需要分數</td>
                                        <td ><span class="font_red">{#if !empty($v.points)#}{#$v.points#}{#else#}/{#/if#}</span><a href="{#optimize_url('help', 'show','page=4')#}" target="_blank"><i class="icon point"></i></a></td>
                                    </tr>
                                </table>
                                </tr>
                            </table>
                        </div>
                        <div class="infobox">
                            {#if $s eq 1#}
                            <span class="numbox">
                                <sup>名額</sup><span class="num">{#$v.quota#}</span>&nbsp;
                                <sup>申請人數</sup><span class="num">{#$v.apply_num#}</span>&nbsp;
                                <sup>人氣</sup><span class="num">{#$v.click#}</span>
                            </span><a href="{#$v._button_url#}" class="btn {#$v._button_css#} ir"><span>{#$v._button_txt#}</span></a>
                            {#else if $s eq 0#}
                            {#if $v._statu eq 2 || $v._statu eq 3#}
                            <span class="numbox">
                                {#if !empty($v.quota)#}<sup>參加人數</sup><span class="num">{#$v.apply_num#}</span>{#/if#}
                            </span><a href="{#$v._button_url#}" class="btn {#$v._button_css#} ir"><span>{#$v._button_txt#}</span></a>
                            {#else#}
                            <span class="numbox">
                                <sup>名額</sup><span class="num">{#$v.quota#}</span>&nbsp;
                                <sup>申請人數</sup><span class="num">{#$v.apply_num#}</span>&nbsp;
                                <sup>人氣</sup><span class="num">{#$v.click#}</span>
                            </span><a href="{#$v._button_url#}" class="btn {#$v._button_css#} ir"><span>{#$v._button_txt#}</span></a>
                            {#/if#}
                            {#else#}
                            <span class="numbox">
                                {#if !empty($v.quota)#}<sup>參加人數</sup><span class="num">{#$v.apply_num#}</span>{#/if#}
                            </span><a href="{#$v._button_url#}" class="btn {#$v._button_css#} ir"><span>{#$v._button_txt#}</span></a>
                            {#/if#}

                            {#if $v._statu eq 0#}
                            <div class="text_coming_info"><strong class="text_coming"></strong></div>
                            {#else if empty($v._difTime.0)#}
                            <div class="text_over_info"><strong class="text_over"></strong></div>
                            {#else#}
                            <div class="info rest_info"><span>尚餘</span><strong>{#$v._difTime.0#}</strong><sub>{#$dateArr[$v._difTime.1]#}</sub></div>
                            {#/if#}

                        </div>
                    </div>
                </div>
                {#/foreach#}

            </div>
        </div>

        {#$pagelist#}
    </div>

    <!-- main-->
    <div class="sidebar">

        {#show_block('b2',1,'','sidebar_ad')#}
        {#show_block('b1',2,'','sidebar_function')#}
        {#show_block('b3',0,'','sidebar_search')#}
        {#show_block('b13',0,'','sidebar_registation')#}
        {#show_block('b9',0,'','sidebar_tutorial b_box')#}
        {#show_block('b5',0,'','sidebar_top3 b_box')#}
        {#show_block('b6',0,'','sidebar_facebook')#}
    </div>
    <!-- sidebar -->

</div><!--body-->
{#include file="footer.php"#}